package com.ddfeiyu.util;

import org.springframework.beans.factory.annotation.Value;

import java.util.Objects;

public class EnvUtil {

    @Value("${env}")
    private String env;

    private static final String ONLINE = "online";

    public String getEnv() {
        return env;
    }

    public boolean isOnline(){
        return Objects.deepEquals(ONLINE ,env);
    }

    public boolean nonOnline(){
        return !isOnline();
    }


}
